package tag31_22_08.list;

import java.util.*;

public class List01_arrayList {

	public static void main(String[] args) {
		
		List<Integer> var = new ArrayList<Integer>(); 	//OK.
//		Iterator<Integer> var = new ArrayList<Integer>(); 	//geht nicht
//		List<Integer> var = new ArrayList<Integer>(); 		// OK.
//		Collections<Integer> var = new ArrayList<Integer>();//geht nicht
		
		
		//Aufgabe
		//in der Liste speicher:1,2,3,4,5.....17
		
		for (int i = 0; i <=17; i++) {
			var.add(i);
		}
		System.out.println(var);
		
		System.out.println("------------------------------------------------------");
		
		for (Integer integer : var) {
			System.out.print(integer+" ");
		}
		System.out.println();
		System.out.println("------------------------------------------------------");
		
		for (int i = 0; i < var.size(); i++) {
			System.out.print(i+" ");
		}
		
	}
}
